package leetcode.hard;

public class $174_CalculateMinimumHP {
    public int calculateMinimumHP(int[][] dungeon) {
        int m = dungeon.length;
        int n = dungeon[0].length;
        // dp[i][j]表示 到达i,j时最大的生命值
        int[][] dp = new int[m][n];
        dp[0][0] = dungeon[0][0];
        for (int i = 1;i < n;i++) {
            dp[0][i] = dp[0][i - 1] + dungeon[0][i - 1];
        }
        for (int j = 1;j < m;j++) {
            dp[j][0] = dp[j - 1][0] + dungeon[j][0];
        }

        for (int i = 1; i < m; i++) {
            for (int j = 1; j < n;j++) {
                dp[i][j] = 0;
            }
        }
        // todo:
        return 0;
    }
}
